package com.autofunction.demos.web;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        String processList = "formtable_main_779#ygxm,formtable_main_779#ygxm,formtable_main_779#ygxm";
        DateTimeFormatter dateformatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        String nowdate = LocalDate.now().format(dateformatter);
        ArrayList list = new ArrayList<String>();
            String[] processListTemp = processList.split(",");
            for (int i = 0; i < processListTemp.length; i++) {
                list.addAll(getRequestIds(processListTemp[i], nowdate));
            }
        System.out.println(list.size());
    }

    private static List getRequestIds(String processConfig, String nowdate){
        List list = new ArrayList<String>();
            String[] temp = processConfig.split("#");
            String tablename = temp[0];
            String fieldname = temp[1];
            System.out.println(tablename+fieldname+nowdate);
            //list = batchArchiveProcessMapper.getRequestList(tablename,fieldname,nowdate);
        return list;
    }
}
